package net.pimpas.web.jsf.components;

import javax.faces.component.UIComponent;
import javax.faces.webapp.UIComponentTag;

public abstract class UIComponentPimpasBaseTag extends UIComponentTag {

	private String styleClass;
	private String style;
	private Boolean noId;
	private String tabIndex;
	private String align;
	
	@Override
	protected void setProperties(UIComponent component) {
		UIComponentPimpasBase componentBase = (UIComponentPimpasBase) component;
		componentBase.setStyleClass(this.getStyleClass());
		componentBase.setStyle(this.getStyle());
		componentBase.setTabIndex(this.getTabIndex());
		componentBase.setAlign(this.getAlign());
		
		if(this.getNoId() == null)
			this.setNoId(Boolean.FALSE);
		
		componentBase.setNoId(this.getNoId());
		super.setProperties(component);
	}

	public String getStyle() {
		return style;
	}

	public void setStyle(String style) {
		this.style = style;
	}

	public String getStyleClass() {
		return styleClass;
	}

	public void setStyleClass(String styleClass) {
		this.styleClass = styleClass;
	}
	
	@Override
	public String getRendererType() {
		return null;
	}

	public Boolean getNoId() {
		return noId;
	}

	public void setNoId(Boolean noId) {
		this.noId = noId;
	}

	public String getTabIndex() {
		return tabIndex;
	}

	public void setTabIndex(String tabIndex) {
		this.tabIndex = tabIndex;
	}

	public String getAlign() {
		return align;
	}

	public void setAlign(String align) {
		this.align = align;
	}
}